#pragma once
#include "RBTree_STL.hpp"
namespace lw
{
	template<class K, class Compare = std::less<K>>
	class set
	{
		struct SetKeyOfT
		{
			const K& operator()(const K& k) const
			{
				return k;
			}
		};
	public:
		typedef typename lw::RBTree<K, K, SetKeyOfT, Compare>::iterator iterator;
		typedef typename lw::RBTree<K, K, SetKeyOfT, Compare>::const_iterator const_iterator;
		iterator begin()
		{
			return _rb.begin();
		}
		iterator end()
		{
			return _rb.end();
		}
		const_iterator begin() const
		{
			return _rb.begin();
		}
		const_iterator end() const
		{
			return _rb.end();
		}

		std::pair<iterator, bool> insert(const K& key)
		{
			return _rb.Insert(key);
		}

	private:
		lw::RBTree<K, K, SetKeyOfT, Compare> _rb;
	};
}